﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>请假流程</title>
    <script type="text/javascript" src="../../Scripts/mxClient.js"></script>
<script type="text/javascript">
    function main(container) {
        if (!mxClient.isBrowserSupported()) {
            mxUtils.error('Browser is not supported!', 200, false);
        }
        else {
            mxRectangleShape.prototype.crisp = true;
            var graph = new mxGraph(container);
            new mxRubberband(graph);

            var style = graph.getStylesheet().getDefaultVertexStyle();
            style[mxConstants.STYLE_PERIMETER] = mxPerimeter.EllipsePerimeter;
            style[mxConstants.STYLE_GRADIENTCOLOR] = 'white';
            style[mxConstants.STYLE_FONTSIZE] = '10';


            var parent = graph.getDefaultParent();

            graph.getModel().beginUpdate();
            try {
                var v1 = graph.insertVertex(parent, null, '开始', 200, 50, 80, 30, 'shape=ellipse;');
                var v2 = graph.insertVertex(parent, null, '活动1', 200, 150, 80, 30);
                var v3 = graph.insertVertex(parent, null, 'a>100', 200, 250, 80, 30, 'fillColor=red;shape=rhombus;');
                var v4 = graph.insertVertex(parent, null, '活动3', 350, 250, 80, 30, 'fillColor=blue;');
                var v5 = graph.insertVertex(parent, null, '活动2', 200, 350, 80, 30, 'fillColor=blue;');
                var v6 = graph.insertVertex(parent, null, '结束', 200, 450, 80, 30, 'fillColor=blue;shape=ellipse;');
                var e1 = graph.insertEdge(parent, null, '', v1, v2);
                var e2 = graph.insertEdge(parent, null, '', v2, v3);
                var e3 = graph.insertEdge(parent, null, '否', v3, v4);
                var e4 = graph.insertEdge(parent, null, '是', v3, v5);
                var e5 = graph.insertEdge(parent, null, '', v5, v6);
                var e6 = graph.insertEdge(parent, null, '', v4, v6);
            }
            finally {
                graph.getModel().endUpdate();
            }
        }
    };
	</script>
</head>

<body onload="main(document.getElementById('graphContainer'))">

	<div id="graphContainer"
		style="overflow:hidden;width:100%;height:1000px;">
	</div>
</body>
</html>
